// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using Elastic.Clients.Elasticsearch.Fluent;
using Elastic.Clients.Elasticsearch.Serialization;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace Elastic.Clients.Elasticsearch.QueryDsl;

public sealed partial class DecayPlacement<TOrigin, TScale>
{
	/// <summary>
	/// <para>
	/// Defines how documents are scored at the distance given at scale.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("decay")]
	public double? Decay { get; set; }

	/// <summary>
	/// <para>
	/// If defined, the decay function will only compute the decay function for documents with a distance greater than the defined <c>offset</c>.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("offset")]
	[SourceConverter]
	public TScale? Offset { get; set; }

	/// <summary>
	/// <para>
	/// The point of origin used for calculating distance. Must be given as a number for numeric field, date for date fields and geo point for geo fields.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("origin")]
	[SourceConverter]
	public TOrigin? Origin { get; set; }

	/// <summary>
	/// <para>
	/// Defines the distance from origin + offset at which the computed score will equal <c>decay</c> parameter.
	/// </para>
	/// </summary>
	[JsonInclude, JsonPropertyName("scale")]
	[SourceConverter]
	public TScale? Scale { get; set; }
}